home *** CD-ROM | disk | FTP | other *** search
/ Resource for Source: C/C++ / Resource for Source - C-C++.iso / codelib7 / v_09_04 / 9n04095a < prev    next >
Encoding:
Text File  |  1995-11-01  |  328 b   |  15 lines

  1.  
  2. /* the following appears in the "globals" header file(s) */
  3. #ifdef IN_MAIN
  4. #define declare( obj, init ) obj = init
  5. #else
  6. #define declare( obj, init ) extern obj;
  7. #endif
  8.  
  9. /* the declarations/definitions */
  10.  
  11. declare( int i, 10 );
  12. declare( char str[], "An initialized string" );
  13. declare( int w[ 10 ][10 ], { 0 } );
  14.  
  15.